Statistics
| Branch: | Revision:

ffmpeg / libavcodec / mpegaudio3.h @ 2912e87a

History | View | Annotate | Download (1.67 KB)

1 d5dfecb1 Michael Niedermayer
/*
2
 * Copyright (c) 2007 Michael Niedermayer
3
 *
4 2912e87a Mans Rullgard
 * This file is part of Libav.
5 d5dfecb1 Michael Niedermayer
 *
6 2912e87a Mans Rullgard
 * Libav is free software; you can redistribute it and/or
7 d5dfecb1 Michael Niedermayer
 * modify it under the terms of the GNU Lesser General Public
8
 * License as published by the Free Software Foundation; either
9
 * version 2.1 of the License, or (at your option) any later version.
10
 *
11 2912e87a Mans Rullgard
 * Libav is distributed in the hope that it will be useful,
12 d5dfecb1 Michael Niedermayer
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 * Lesser General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Lesser General Public
17 2912e87a Mans Rullgard
 * License along with Libav; if not, write to the Free Software
18 d5dfecb1 Michael Niedermayer
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
 */
20
21
/* layer 3 "granule" */
22
typedef struct GranuleDef {
23
    uint8_t scfsi;
24
    int part2_3_length;
25
    int big_values;
26
    int global_gain;
27
    int scalefac_compress;
28
    uint8_t block_type;
29
    uint8_t switch_point;
30
    int table_select[3];
31
    int subblock_gain[3];
32
    uint8_t scalefac_scale;
33
    uint8_t count1table_select;
34
    int region_size[3]; /* number of huffman codes in each region */
35
    int preflag;
36
    int short_start, long_end; /* long/short band indexes */
37
    uint8_t scale_factors[40];
38
    int32_t sb_hybrid[SBLIMIT * 18]; /* 576 samples */
39
} GranuleDef;
40
41
void ff_mp3_init(void);
42
43
/**
44
 * Compute huffman coded region sizes.
45
 */
46
void ff_init_short_region(MPADecodeContext *s, GranuleDef *g);
47
48
/**
49
 * Compute huffman coded region sizes.
50
 */
51
void ff_init_long_region(MPADecodeContext *s, GranuleDef *g, int ra1, int ra2);
52
53
void ff_compute_band_indexes(MPADecodeContext *s, GranuleDef *g);