~ubuntu-branches/ubuntu/maverick/mumble/maverick-security

« back to all changes in this revision

Viewing changes to celt-0.7.0-src/libcelt/bands.h

  • Committer: Bazaar Package Importer
  • Author(s): Thorvald Natvig
  • Date: 2009-12-10 20:29:29 UTC
  • mfrom: (9.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091210202929-3096zttdt0ie9kw6
Tags: 1.2.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Copyright (c) 2007-2008 CSIRO
2
2
   Copyright (c) 2007-2009 Xiph.Org Foundation
3
 
   Copyright (c) 2008-2009 Gregory Maxwell 
 
3
   Copyright (c) 2008-2009 Gregory Maxwell
4
4
   Written by Jean-Marc Valin and Gregory Maxwell */
5
5
/*
6
6
   Redistribution and use in source and binary forms, with or without
7
7
   modification, are permitted provided that the following conditions
8
8
   are met:
9
 
   
 
9
 
10
10
   - Redistributions of source code must retain the above copyright
11
11
   notice, this list of conditions and the following disclaimer.
12
 
   
 
12
 
13
13
   - Redistributions in binary form must reproduce the above copyright
14
14
   notice, this list of conditions and the following disclaimer in the
15
15
   documentation and/or other materials provided with the distribution.
16
 
   
 
16
 
17
17
   - Neither the name of the Xiph.org Foundation nor the names of its
18
18
   contributors may be used to endorse or promote products derived from
19
19
   this software without specific prior written permission.
20
 
   
 
20
 
21
21
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
22
   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
23
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
40
40
#include "entdec.h"
41
41
#include "rate.h"
42
42
 
43
 
/** Compute the amplitude (sqrt energy) in each of the bands 
44
 
 * @param m Mode data 
 
43
/** Compute the amplitude (sqrt energy) in each of the bands
 
44
 * @param m Mode data
45
45
 * @param X Spectrum
46
46
 * @param bands Square root of the energy for each band (returned)
47
47
 */
49
49
 
50
50
/*void compute_noise_energies(const CELTMode *m, const celt_sig *X, const celt_word16 *tonality, celt_ener *bank);*/
51
51
 
52
 
/** Normalise each band of X such that the energy in each band is 
 
52
/** Normalise each band of X such that the energy in each band is
53
53
    equal to 1
54
 
 * @param m Mode data 
 
54
 * @param m Mode data
55
55
 * @param X Spectrum (returned normalised)
56
56
 * @param bands Square root of the energy for each band
57
57
 */
60
60
void renormalise_bands(const CELTMode *m, celt_norm * restrict X, int _C);
61
61
 
62
62
/** Denormalise each band of X to restore full amplitude
63
 
 * @param m Mode data 
 
63
 * @param m Mode data
64
64
 * @param X Spectrum (returned de-normalised)
65
65
 * @param bands Square root of the energy for each band
66
66
 */
67
67
void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig * restrict freq, const celt_ener *bands, int _C);
68
68
 
69
69
/** Compute the pitch predictor gain for each pitch band
70
 
 * @param m Mode data 
 
70
 * @param m Mode data
71
71
 * @param X Spectrum to predict
72
72
 * @param P Pitch vector (normalised)
73
73
 * @param gains Gain computed for each pitch band (returned)
80
80
int folding_decision(const CELTMode *m, celt_norm *X, celt_word16 *average, int *last_decision, int _C);
81
81
 
82
82
/** Quantisation/encoding of the residual spectrum
83
 
 * @param m Mode data 
 
83
 * @param m Mode data
84
84
 * @param X Residual (normalised)
85
85
 * @param total_bits Total number of bits that can be used for the frame (including the ones already spent)
86
86
 * @param enc Entropy encoder
90
90
void quant_bands_stereo(const CELTMode *m, celt_norm * restrict X, const celt_ener *bandE, int *pulses, int time_domain, int fold, int total_bits, ec_enc *enc);
91
91
 
92
92
/** Decoding of the residual spectrum
93
 
 * @param m Mode data 
 
93
 * @param m Mode data
94
94
 * @param X Residual (normalised)
95
95
 * @param total_bits Total number of bits that can be used for the frame (including the ones already spent)
96
96
 * @param dec Entropy decoder