1 /* 2 Copyright (c) 2005-2009, The Musepack Development Team 3 All rights reserved. 4 5 Redistribution and use in source and binary forms, with or without 6 modification, are permitted provided that the following conditions are 7 met: 8 9 * Redistributions of source code must retain the above copyright 10 notice, this list of conditions and the following disclaimer. 11 12 * Redistributions in binary form must reproduce the above 13 copyright notice, this list of conditions and the following 14 disclaimer in the documentation and/or other materials provided 15 with the distribution. 16 17 * Neither the name of the The Musepack Development Team nor the 18 names of its contributors may be used to endorse or promote 19 products derived from this software without specific prior 20 written permission. 21 22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 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. 33 */ 34 /// \file requant.h 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/mpc_types.h> 43 44 #ifdef __cplusplus 45 extern "C" { 46 #endif 47 48 49 /* C O N S T A N T S */ 50 extern const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer 51 extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients 52 extern const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset 53 54 #define Cc (__Cc + 1) 55 #define Dc (__Dc + 1) 56 57 58 #ifdef __cplusplus 59 } 60 #endif 61 #endif 62