X-Git-Url: http://git.xiph.org/?p=opus.git;a=blobdiff_plain;f=libcelt%2Fvq.h;h=56a31b6f80c6fd8a2051cfddea58a1ebb642d12e;hp=7388293b4e5f34af4fb5faa90e1590fd3d5340bf;hb=58ecb1ac15cadec832fc5e539c250b0a6b1a0b90;hpb=896471dc3dda1f1a60b8cb176b6dc91589f40c8d diff --git a/libcelt/vq.h b/libcelt/vq.h index 7388293b..56a31b6f 100644 --- a/libcelt/vq.h +++ b/libcelt/vq.h @@ -1,5 +1,6 @@ -/* (C) 2007-2008 Jean-Marc Valin, CSIRO -*/ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Written by Jean-Marc Valin */ /** @file vq.h @brief Vector quantisation of the residual @@ -16,10 +17,6 @@ notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - Neither the name of the Xiph.org Foundation nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -49,8 +46,10 @@ * @param K Number of pulses to use * @param p Pitch vector (it is assumed that p+x is a unit vector) * @param enc Entropy encoder state + * @ret A mask indicating which blocks in the band received pulses */ -void alg_quant(celt_norm_t *X, celt_mask_t *W, int N, int K, const celt_norm_t *P, ec_enc *enc); +unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B, + int resynth, ec_enc *enc, celt_word16 gain); /** Algebraic pulse decoder * @param x Decoded normalised spectrum (returned) @@ -58,22 +57,13 @@ void alg_quant(celt_norm_t *X, celt_mask_t *W, int N, int K, const celt_norm_t * * @param K Number of pulses to use * @param p Pitch vector (automatically added to x) * @param dec Entropy decoder state + * @ret A mask indicating which blocks in the band received pulses */ -void alg_unquant(celt_norm_t *X, int N, int K, celt_norm_t *P, ec_dec *dec); +unsigned alg_unquant(celt_norm *X, int N, int K, int spread, int B, + ec_dec *dec, celt_word16 gain); -void renormalise_vector(celt_norm_t *X, celt_word16_t value, int N, int stride); +void renormalise_vector(celt_norm *X, int N, celt_word16 gain); -/** Intra-frame predictor that matches a section of the current frame (at lower - * frequencies) to encode the current band. - * @param x Residual signal to quantise/encode (returns quantised version) - * @param W Perceptual weight - * @param N Number of samples to encode - * @param K Number of pulses to use - * @param Y Lower frequency spectrum to use, normalised to the same standard deviation - * @param P Pitch vector (it is assumed that p+x is a unit vector) - * @param B Stride (number of channels multiplied by the number of MDCTs per frame) - * @param N0 Number of valid offsets - */ -void intra_fold(const CELTMode *m, celt_norm_t * restrict x, int N, int K, celt_norm_t *Y, celt_norm_t * restrict P, int N0, int B); +int stereo_itheta(celt_norm *X, celt_norm *Y, int stereo, int N); #endif /* VQ_H */