~ubuntu-branches/ubuntu/precise/flac/precise-updates

« back to all changes in this revision

Viewing changes to src/libFLAC/include/private/lpc.h

  • Committer: Bazaar Package Importer
  • Author(s): Joshua Kwan
  • Date: 2007-05-29 22:56:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529225636-ljeff8xxip09qaap
Tags: 1.1.4-1
* New upstream release. closes: #405167, #411311
  - libOggFLAC and libOggFLAC++ have been merged into libFLAC, so
    remove their corresponding packages.
  - Because of the API changes required to effect the above, there has
    been yet another soname bump. libflac7 -> libflac8 and
    libflac++5 -> libflac++6. Emails have been dispatched to the
    maintainers of dependent packages.
* Some notes on patches that were removed:
  - 02_stdin_stdout, 06_manpage_mention_utf8_convert: merged upstream
  - 08_manpage_warnings: Upstream has changed the manpage so it defintely
    can't fit in in 80 cols, so just forget about it. We'll live.
  - 05_eof_warnings_are_errors: Upstream decided to add a -w option to
    flac to treat all warnings as errors. I am going to defer to that
    for now, but if people think it's stupid let me know and I'll port
    the patch forward.
  - 04_stack_smasher: was a backport from 1.1.3, so it's obsolete.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* libFLAC - Free Lossless Audio Codec library
2
 
 * Copyright (C) 2000,2001,2002,2003,2004,2005  Josh Coalson
 
2
 * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
3
3
 *
4
4
 * Redistribution and use in source and binary forms, with or without
5
5
 * modification, are permitted provided that the following conditions
42
42
#ifndef FLAC__INTEGER_ONLY_LIBRARY
43
43
 
44
44
/*
 
45
 *      FLAC__lpc_window_data()
 
46
 *      --------------------------------------------------------------------
 
47
 *      Applies the given window to the data.
 
48
 *  OPT: asm implementation
 
49
 *
 
50
 *      IN in[0,data_len-1]
 
51
 *      IN window[0,data_len-1]
 
52
 *      OUT out[0,lag-1]
 
53
 *      IN data_len
 
54
 */
 
55
void FLAC__lpc_window_data(const FLAC__real in[], const FLAC__real window[], FLAC__real out[], unsigned data_len);
 
56
 
 
57
/*
45
58
 *      FLAC__lpc_compute_autocorrelation()
46
59
 *      --------------------------------------------------------------------
47
60
 *      Compute the autocorrelation for lags between 0 and lag-1.
78
91
 *      OUT lp_coeff[0,max_order-1][0,max_order-1] LP coefficients for each order
79
92
 *      *** IMPORTANT:
80
93
 *      *** lp_coeff[0,max_order-1][max_order,FLAC__MAX_LPC_ORDER-1] are untouched
81
 
 *      OUT error[0,max_order-1]                   error for each order
 
94
 *      OUT error[0,max_order-1]                   error for each order (more
 
95
 *                                                 specifically, the variance of
 
96
 *                                                 the error signal times # of
 
97
 *                                                 samples in the signal)
82
98
 *
83
99
 *      Example: if max_order is 9, the LP coefficients for order 9 will be
84
100
 *               in lp_coeff[8][0,8], the LP coefficients for order 8 will be
85
101
 *                       in lp_coeff[7][0,7], etc.
86
102
 */
87
 
void FLAC__lpc_compute_lp_coefficients(const FLAC__real autoc[], unsigned max_order, FLAC__real lp_coeff[][FLAC__MAX_LPC_ORDER], FLAC__double error[]);
 
103
void FLAC__lpc_compute_lp_coefficients(const FLAC__real autoc[], unsigned *max_order, FLAC__real lp_coeff[][FLAC__MAX_LPC_ORDER], FLAC__double error[]);
88
104
 
89
105
/*
90
106
 *      FLAC__lpc_quantize_coefficients()
187
203
 *      IN lpc_error[0,max_order-1] >= 0.0  error returned from calculating LP coefficients
188
204
 *      IN max_order > 0                    max LP order
189
205
 *      IN total_samples > 0                # of samples in residual signal
190
 
 *      IN bits_per_signal_sample           # of bits per sample in the original signal
 
206
 *      IN overhead_bits_per_order          # of bits overhead for each increased LP order
 
207
 *                                          (includes warmup sample size and quantized LP coefficient)
191
208
 *      RETURN [1,max_order]                best order
192
209
 */
193
 
unsigned FLAC__lpc_compute_best_order(const FLAC__double lpc_error[], unsigned max_order, unsigned total_samples, unsigned bits_per_signal_sample);
 
210
unsigned FLAC__lpc_compute_best_order(const FLAC__double lpc_error[], unsigned max_order, unsigned total_samples, unsigned overhead_bits_per_order);
194
211
 
195
212
#endif /* !defined FLAC__INTEGER_ONLY_LIBRARY */
196
213