From b3d9578c27160280dc01350f6e7b87d0be53d70f Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sun, 7 Mar 2010 19:34:44 +0000 Subject: 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 --- apps/codecs/libmusepack/requant.h | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'apps/codecs/libmusepack/requant.h') 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 @@ /* - Copyright (c) 2005, The Musepack Development Team + Copyright (c) 2005-2009, The Musepack Development Team All rights reserved. Redistribution and use in source and binary forms, with or without @@ -31,27 +31,31 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - /// \file requant.h /// Requantization function definitions. +#ifndef _MPCDEC_REQUANT_H_ +#define _MPCDEC_REQUANT_H_ +#ifdef WIN32 +#pragma once +#endif + +#include "mpc_types.h" -#ifndef _mpcdec_requant_h -#define _mpcdec_requant_h_ +#ifdef __cplusplus +extern "C" { +#endif -#include "musepack.h" /* C O N S T A N T S */ -extern const mpc_uint32_t Res_bit[18]; // bits per sample for chosen quantizer -extern const MPC_SAMPLE_FORMAT __Cc[1 + 18]; // coefficients for requantization -extern const mpc_int32_t __Dc[1 + 18]; // offset for requantization -extern const mpc_int32_t idx30[27]; // 1st value of bundled 3-step quantizer -extern const mpc_int32_t idx31[27]; // 2nd value of bundled 3-step quantizer -extern const mpc_int32_t idx32[27]; // 3rd value of bundled 3-step quantizer -extern const mpc_int32_t idx50[25]; // 1st value of bundled 5-step quantizer -extern const mpc_int32_t idx51[25]; // 2nd value of bundled 5-step quantizer +const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer +const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients +const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset +#define Cc (__Cc + 1) +#define Dc (__Dc + 1) -#define Cc (__Cc + 1) -#define Dc (__Dc + 1) -#endif // _mpcdec_requant_h_ +#ifdef __cplusplus +} +#endif +#endif -- cgit v1.2.3