diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-03-07 19:34:44 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-03-07 19:34:44 +0000 |
commit | b3d9578c27160280dc01350f6e7b87d0be53d70f (patch) | |
tree | 8580a0956a6dfa19dbfe7a48409be7c0e6e9004f /apps/codecs/libmusepack/requant.h | |
parent | ce92b8bf34bcd790dad7f36152520d9fec687073 (diff) | |
download | rockbox-b3d9578c27160280dc01350f6e7b87d0be53d70f.tar.gz rockbox-b3d9578c27160280dc01350f6e7b87d0be53d70f.zip |
Major change to musepack decoder: Import v1.3.0 (r458 from svn.musepack.net) to rockbox. Several adaptions in the musepack decoder were made to get the library work and perform fast under rockbox on several targets. With this change mpc sv8 is supported, including seek, replay gain and metadata support. The decoding speed is a 1-4% lower than the last implementation. Reason for this is main restructuring in the bitstream demuxer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25056 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmusepack/requant.h')
-rw-r--r-- | apps/codecs/libmusepack/requant.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/apps/codecs/libmusepack/requant.h b/apps/codecs/libmusepack/requant.h index 1a21c21143..8458d4d0fa 100644 --- a/apps/codecs/libmusepack/requant.h +++ b/apps/codecs/libmusepack/requant.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | Copyright (c) 2005, The Musepack Development Team | 2 | Copyright (c) 2005-2009, The Musepack Development Team |
3 | All rights reserved. | 3 | All rights reserved. |
4 | 4 | ||
5 | Redistribution and use in source and binary forms, with or without | 5 | Redistribution and use in source and binary forms, with or without |
@@ -31,27 +31,31 @@ | |||
31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
33 | */ | 33 | */ |
34 | |||
35 | /// \file requant.h | 34 | /// \file requant.h |
36 | /// Requantization function definitions. | 35 | /// Requantization function definitions. |
36 | #ifndef _MPCDEC_REQUANT_H_ | ||
37 | #define _MPCDEC_REQUANT_H_ | ||
38 | #ifdef WIN32 | ||
39 | #pragma once | ||
40 | #endif | ||
41 | |||
42 | #include "mpc_types.h" | ||
37 | 43 | ||
38 | #ifndef _mpcdec_requant_h | 44 | #ifdef __cplusplus |
39 | #define _mpcdec_requant_h_ | 45 | extern "C" { |
46 | #endif | ||
40 | 47 | ||
41 | #include "musepack.h" | ||
42 | 48 | ||
43 | /* C O N S T A N T S */ | 49 | /* C O N S T A N T S */ |
44 | extern const mpc_uint32_t Res_bit[18]; // bits per sample for chosen quantizer | 50 | const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer |
45 | extern const MPC_SAMPLE_FORMAT __Cc[1 + 18]; // coefficients for requantization | 51 | const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients |
46 | extern const mpc_int32_t __Dc[1 + 18]; // offset for requantization | 52 | const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset |
47 | extern const mpc_int32_t idx30[27]; // 1st value of bundled 3-step quantizer | ||
48 | extern const mpc_int32_t idx31[27]; // 2nd value of bundled 3-step quantizer | ||
49 | extern const mpc_int32_t idx32[27]; // 3rd value of bundled 3-step quantizer | ||
50 | extern const mpc_int32_t idx50[25]; // 1st value of bundled 5-step quantizer | ||
51 | extern const mpc_int32_t idx51[25]; // 2nd value of bundled 5-step quantizer | ||
52 | 53 | ||
54 | #define Cc (__Cc + 1) | ||
55 | #define Dc (__Dc + 1) | ||
53 | 56 | ||
54 | #define Cc (__Cc + 1) | ||
55 | #define Dc (__Dc + 1) | ||
56 | 57 | ||
57 | #endif // _mpcdec_requant_h_ | 58 | #ifdef __cplusplus |
59 | } | ||
60 | #endif | ||
61 | #endif | ||