annotate mpegaudio3.h @ 11383:3d5d0c2d5b6b libavcodec

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