summaryrefslogtreecommitdiff
path: root/apps/codecs/libmusepack/requant.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libmusepack/requant.c')
-rw-r--r--apps/codecs/libmusepack/requant.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/apps/codecs/libmusepack/requant.c b/apps/codecs/libmusepack/requant.c
index 3282286d74..d40f36fded 100644
--- a/apps/codecs/libmusepack/requant.c
+++ b/apps/codecs/libmusepack/requant.c
@@ -69,6 +69,33 @@ const mpc_int32_t __Dc [1 + 18] ICONST_ATTR = {
69 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767 69 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767
70}; 70};
71 71
72// decoding results (requantized) for bundled quantizers (3- and 5-step)
73// 1st value of bundled 3-step quantizer
74const mpc_int32_t idx30[27] ICONST_ATTR = { -1, 0, 1,-1, 0, 1,-1, 0, 1,
75 -1, 0, 1,-1, 0, 1,-1, 0, 1,
76 -1, 0, 1,-1, 0, 1,-1, 0, 1};
77// 2nd value of bundled 3-step quantizer
78const mpc_int32_t idx31[27] ICONST_ATTR = { -1,-1,-1, 0, 0, 0, 1, 1, 1,
79 -1,-1,-1, 0, 0, 0, 1, 1, 1,
80 -1,-1,-1, 0, 0, 0, 1, 1, 1};
81// 3rd value of bundled 3-step quantizer
82const mpc_int32_t idx32[27] ICONST_ATTR = { -1,-1,-1,-1,-1,-1,-1,-1,-1,
83 0, 0, 0, 0, 0, 0, 0, 0, 0,
84 1, 1, 1, 1, 1, 1, 1, 1, 1};
85// 1st value of bundled 5-step quantizer
86const mpc_int32_t idx50[25] ICONST_ATTR = { -2,-1, 0, 1, 2,
87 -2,-1, 0, 1, 2,
88 -2,-1, 0, 1, 2,
89 -2,-1, 0, 1, 2,
90 -2,-1, 0, 1, 2};
91// 2nd value of bundled 5-step quantizer
92const mpc_int32_t idx51[25] ICONST_ATTR = { -2,-2,-2,-2,-2,
93 -1,-1,-1,-1,-1,
94 0, 0, 0, 0, 0,
95 1, 1, 1, 1, 1,
96 2, 2, 2, 2, 2};
97
98
72#ifdef MPC_FIXED_POINT 99#ifdef MPC_FIXED_POINT
73static mpc_uint32_t find_shift(double fval) 100static mpc_uint32_t find_shift(double fval)
74{ 101{