1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libopus/celt/quant_bands.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,66 @@ 1.4 +/* Copyright (c) 2007-2008 CSIRO 1.5 + Copyright (c) 2007-2009 Xiph.Org Foundation 1.6 + Written by Jean-Marc Valin */ 1.7 +/* 1.8 + Redistribution and use in source and binary forms, with or without 1.9 + modification, are permitted provided that the following conditions 1.10 + are met: 1.11 + 1.12 + - Redistributions of source code must retain the above copyright 1.13 + notice, this list of conditions and the following disclaimer. 1.14 + 1.15 + - Redistributions in binary form must reproduce the above copyright 1.16 + notice, this list of conditions and the following disclaimer in the 1.17 + documentation and/or other materials provided with the distribution. 1.18 + 1.19 + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1.20 + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1.21 + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1.22 + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 1.23 + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 1.24 + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 1.25 + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 1.26 + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 1.27 + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 1.28 + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 1.29 + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1.30 +*/ 1.31 + 1.32 +#ifndef QUANT_BANDS 1.33 +#define QUANT_BANDS 1.34 + 1.35 +#include "arch.h" 1.36 +#include "modes.h" 1.37 +#include "entenc.h" 1.38 +#include "entdec.h" 1.39 +#include "mathops.h" 1.40 + 1.41 +#ifdef FIXED_POINT 1.42 +extern const signed char eMeans[25]; 1.43 +#else 1.44 +extern const opus_val16 eMeans[25]; 1.45 +#endif 1.46 + 1.47 +void amp2Log2(const CELTMode *m, int effEnd, int end, 1.48 + celt_ener *bandE, opus_val16 *bandLogE, int C); 1.49 + 1.50 +void log2Amp(const CELTMode *m, int start, int end, 1.51 + celt_ener *eBands, const opus_val16 *oldEBands, int C); 1.52 + 1.53 +void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, 1.54 + const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget, 1.55 + opus_val16 *error, ec_enc *enc, int C, int LM, 1.56 + int nbAvailableBytes, int force_intra, opus_val32 *delayedIntra, 1.57 + int two_pass, int loss_rate, int lfe); 1.58 + 1.59 +void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C); 1.60 + 1.61 +void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int C); 1.62 + 1.63 +void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int C, int LM); 1.64 + 1.65 +void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int C); 1.66 + 1.67 +void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int C); 1.68 + 1.69 +#endif /* QUANT_BANDS */