~ubuntu-branches/ubuntu/oneiric/libav/oneiric

« back to all changes in this revision

Viewing changes to libavcodec/aac.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2011-04-30 14:27:42 UTC
  • mfrom: (1.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110430142742-quvblxk1tj6adlh5
Tags: 4:0.7~b1-1ubuntu1
* Merge from debian. Remaining changes:
  - don't build against libfaad, libdirac, librtmp and libopenjpeg
    (all in universe)
  - explicitly --enable-pic on powerpc, cf. LP #654666
  - different arm configure bits that should probably better be
    merged into debian
* Cherry-picked from git: 
  - install doc/APIChanges and refer to them in NEWS.Debian (Closes: #623682)
  - don't try to install non-existing documentation, fixes FTBFS on powerpc

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 * Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org )
4
4
 * Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com )
5
5
 *
6
 
 * This file is part of FFmpeg.
 
6
 * This file is part of Libav.
7
7
 *
8
 
 * FFmpeg is free software; you can redistribute it and/or
 
8
 * Libav is free software; you can redistribute it and/or
9
9
 * modify it under the terms of the GNU Lesser General Public
10
10
 * License as published by the Free Software Foundation; either
11
11
 * version 2.1 of the License, or (at your option) any later version.
12
12
 *
13
 
 * FFmpeg is distributed in the hope that it will be useful,
 
13
 * Libav is distributed in the hope that it will be useful,
14
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
16
 * Lesser General Public License for more details.
17
17
 *
18
18
 * You should have received a copy of the GNU Lesser General Public
19
 
 * License along with FFmpeg; if not, write to the Free Software
 
19
 * License along with Libav; if not, write to the Free Software
20
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
21
 */
22
22
 
35
35
#include "fft.h"
36
36
#include "mpeg4audio.h"
37
37
#include "sbr.h"
 
38
#include "fmtconvert.h"
38
39
 
39
40
#include <stdint.h>
40
41
 
42
43
#define MAX_ELEM_ID 16
43
44
 
44
45
#define TNS_MAX_ORDER 20
 
46
#define MAX_LTP_LONG_SFB 40
45
47
 
46
48
enum RawDataBlockType {
47
49
    TYPE_SCE,
130
132
#define SCALE_DIFF_ZERO  60    ///< codebook index corresponding to zero scalefactor indices difference
131
133
 
132
134
/**
 
135
 * Long Term Prediction
 
136
 */
 
137
typedef struct {
 
138
    int8_t present;
 
139
    int16_t lag;
 
140
    float coef;
 
141
    int8_t used[MAX_LTP_LONG_SFB];
 
142
} LongTermPrediction;
 
143
 
 
144
/**
133
145
 * Individual Channel Stream
134
146
 */
135
147
typedef struct {
138
150
    uint8_t use_kb_window[2];   ///< If set, use Kaiser-Bessel window, otherwise use a sinus window.
139
151
    int num_window_groups;
140
152
    uint8_t group_len[8];
 
153
    LongTermPrediction ltp;
141
154
    const uint16_t *swb_offset; ///< table of offsets to the lowest spectral coefficient of a scalefactor band, sfb, for a particular window
142
155
    const uint8_t *swb_sizes;   ///< table of scalefactor band sizes for a particular window
143
156
    int num_swb;                ///< number of scalefactor window bands
205
218
    IndividualChannelStream ics;
206
219
    TemporalNoiseShaping tns;
207
220
    Pulse pulse;
208
 
    enum BandType band_type[128];             ///< band types
209
 
    int band_type_run_end[120];               ///< band type run end points
210
 
    float sf[120];                            ///< scalefactors
211
 
    int sf_idx[128];                          ///< scalefactor indices (used by encoder)
212
 
    uint8_t zeroes[128];                      ///< band is not coded (used by encoder)
213
 
    DECLARE_ALIGNED(16, float, coeffs)[1024]; ///< coefficients for IMDCT
214
 
    DECLARE_ALIGNED(16, float, saved)[1024];  ///< overlap
215
 
    DECLARE_ALIGNED(16, float, ret)[2048];    ///< PCM output
 
221
    enum BandType band_type[128];                   ///< band types
 
222
    int band_type_run_end[120];                     ///< band type run end points
 
223
    float sf[120];                                  ///< scalefactors
 
224
    int sf_idx[128];                                ///< scalefactor indices (used by encoder)
 
225
    uint8_t zeroes[128];                            ///< band is not coded (used by encoder)
 
226
    DECLARE_ALIGNED(16, float,   coeffs)[1024];     ///< coefficients for IMDCT
 
227
    DECLARE_ALIGNED(16, float,   saved)[1024];      ///< overlap
 
228
    DECLARE_ALIGNED(16, float,   ret)[2048];        ///< PCM output
 
229
    DECLARE_ALIGNED(16, int16_t, ltp_state)[3072];  ///< time signal for LTP
216
230
    PredictorState predictor_state[MAX_PREDICTORS];
217
231
} SingleChannelElement;
218
232
 
251
265
                                                   */
252
266
    ChannelElement          *che[4][MAX_ELEM_ID];
253
267
    ChannelElement  *tag_che_map[4][MAX_ELEM_ID];
254
 
    uint8_t tags_seen_this_frame[4][MAX_ELEM_ID];
255
268
    int tags_mapped;
256
269
    /** @} */
257
270
 
268
281
     */
269
282
    FFTContext mdct;
270
283
    FFTContext mdct_small;
 
284
    FFTContext mdct_ltp;
271
285
    DSPContext dsp;
 
286
    FmtConvertContext fmt_conv;
272
287
    int random_state;
273
288
    /** @} */
274
289
 
277
292
     * @{
278
293
     */
279
294
    float *output_data[MAX_CHANNELS];                 ///< Points to each element's 'ret' buffer (PCM output).
280
 
    float add_bias;                                   ///< offset for dsp.float_to_int16
281
295
    float sf_scale;                                   ///< Pre-scale for correct IMDCT and dsp.float_to_int16.
282
296
    int sf_offset;                                    ///< offset into pow2sf_tab as appropriate for dsp.float_to_int16
283
297
    /** @} */