Debian Codegraph @

external/mp3/mad_frame.h

raw symbols SCIP
1 /*
2 * libmad - MPEG audio decoder library
3 * Copyright (C) 2000-2004 Underbit Technologies, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * $Id: frame.h,v 1.20 2004/01/23 09:41:32 rob Exp $
20 */
21
22 # ifndef LIBMAD_FRAME_H
23 # define LIBMAD_FRAME_Hcxx . . $ `external/mp3/mad_frame.h:23:10`!
24
25 # include "mad_fixed.h"cxx . . $ `<file>/external/mp3/mad_fixed.h`/
26 # include "mad_timer.h"cxx . . $ `<file>/external/mp3/mad_timer.h`/
27 # include "mad_stream.h"cxx . . $ `<file>/external/mp3/mad_stream.h`/
28
29 enum mad_layercxx . . $ mad_layer# {
30 MAD_LAYER_Icxx . . $ MAD_LAYER_I. = 1, /* Layer I */
31 MAD_LAYER_IIcxx . . $ MAD_LAYER_II. = 2, /* Layer II */
32 MAD_LAYER_IIIcxx . . $ MAD_LAYER_III. = 3 /* Layer III */
33 };
34
35 enum mad_modecxx . . $ mad_mode# {
36 MAD_MODE_SINGLE_CHANNELcxx . . $ MAD_MODE_SINGLE_CHANNEL. = 0, /* single channel */
37 MAD_MODE_DUAL_CHANNELcxx . . $ MAD_MODE_DUAL_CHANNEL. = 1, /* dual channel */
38 MAD_MODE_JOINT_STEREOcxx . . $ MAD_MODE_JOINT_STEREO. = 2, /* joint (MS/intensity) stereo */
39 MAD_MODE_STEREOcxx . . $ MAD_MODE_STEREO. = 3 /* normal LR stereo */
40 };
41
42 enum mad_emphasiscxx . . $ mad_emphasis# {
43 MAD_EMPHASIS_NONEcxx . . $ MAD_EMPHASIS_NONE. = 0, /* no emphasis */
44 MAD_EMPHASIS_50_15_UScxx . . $ MAD_EMPHASIS_50_15_US. = 1, /* 50/15 microseconds emphasis */
45 MAD_EMPHASIS_CCITT_J_17cxx . . $ MAD_EMPHASIS_CCITT_J_17. = 3, /* CCITT J.17 emphasis */
46 MAD_EMPHASIS_RESERVEDcxx . . $ MAD_EMPHASIS_RESERVED. = 2 /* unknown emphasis */
47 };
48
49 struct mad_headercxx . . $ mad_header# {
50 enum mad_layercxx . . $ mad_layer# layercxx . . $ mad_header#layer.; /* audio layer (1, 2, or 3) */
51 enum mad_modecxx . . $ mad_mode# modecxx . . $ mad_header#mode.; /* channel mode (see above) */
52 int mode_extensioncxx . . $ mad_header#mode_extension.; /* additional mode info */
53 enum mad_emphasiscxx . . $ mad_emphasis# emphasiscxx . . $ mad_header#emphasis.; /* de-emphasis to use (see above) */
54
55 unsigned long bitratecxx . . $ mad_header#bitrate.; /* stream bitrate (bps) */
56 unsigned int sampleratecxx . . $ mad_header#samplerate.; /* sampling frequency (Hz) */
57
58 unsigned short crc_checkcxx . . $ mad_header#crc_check.; /* frame CRC accumulator */
59 unsigned short crc_targetcxx . . $ mad_header#crc_target.; /* final target CRC checksum */
60
61 int flagscxx . . $ mad_header#flags.; /* flags (see below) */
62 int private_bitscxx . . $ mad_header#private_bits.; /* private bits (see below) */
63
64 mad_timer_tcxx . . $ mad_timer_t# durationcxx . . $ mad_header#duration.; /* audio playing time of frame */
65
66 /* Erez Volk 2007-05-30: */
67 unsigned long offsetcxx . . $ mad_header#offset.; /* Offset of frame in stream */
68 };
69
70 struct mad_framecxx . . $ mad_frame# {
71 struct mad_headercxx . . $ mad_header# headercxx . . $ mad_frame#header.; /* MPEG audio header */
72
73 int optionscxx . . $ mad_frame#options.; /* decoding options (from stream) */
74
75 mad_fixed_tcxx . . $ mad_fixed_t# sbsamplecxx . . $ mad_frame#sbsample.[2][36][32]; /* synthesis subband filter samples */
76 mad_fixed_tcxx . . $ mad_fixed_t# (*overlapcxx . . $ mad_frame#overlap.)[2][32][18]; /* Layer III block overlap data */
77 };
78
79 # define MAD_NCHANNELScxx . . $ `external/mp3/mad_frame.h:79:10`!(header) ((header)->mode ? 2 : 1)
80 # define MAD_NSBSAMPLEScxx . . $ `external/mp3/mad_frame.h:80:10`!(header) \
81 ((header)->layer == MAD_LAYER_I ? 12 : \
82 (((header)->layer == MAD_LAYER_III && \
83 ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36))
84
85 enumcxx . . $ $anonymous_type_a6579a3bd322e1b7_0# {
86 MAD_FLAG_NPRIVATE_IIIcxx . . $ MAD_FLAG_NPRIVATE_III. = 0x0007, /* number of Layer III private bits */
87 MAD_FLAG_INCOMPLETEcxx . . $ MAD_FLAG_INCOMPLETE. = 0x0008, /* header but not data is decoded */
88
89 MAD_FLAG_PROTECTIONcxx . . $ MAD_FLAG_PROTECTION. = 0x0010, /* frame has CRC protection */
90 MAD_FLAG_COPYRIGHTcxx . . $ MAD_FLAG_COPYRIGHT. = 0x0020, /* frame is copyright */
91 MAD_FLAG_ORIGINALcxx . . $ MAD_FLAG_ORIGINAL. = 0x0040, /* frame is original (else copy) */
92 MAD_FLAG_PADDINGcxx . . $ MAD_FLAG_PADDING. = 0x0080, /* frame has additional slot */
93
94 MAD_FLAG_I_STEREOcxx . . $ MAD_FLAG_I_STEREO. = 0x0100, /* uses intensity joint stereo */
95 MAD_FLAG_MS_STEREOcxx . . $ MAD_FLAG_MS_STEREO. = 0x0200, /* uses middle/side joint stereo */
96 MAD_FLAG_FREEFORMATcxx . . $ MAD_FLAG_FREEFORMAT. = 0x0400, /* uses free format bitrate */
97
98 MAD_FLAG_LSF_EXTcxx . . $ MAD_FLAG_LSF_EXT. = 0x1000, /* lower sampling freq. extension */
99 MAD_FLAG_MC_EXTcxx . . $ MAD_FLAG_MC_EXT. = 0x2000, /* multichannel audio extension */
100 MAD_FLAG_MPEG_2_5_EXTcxx . . $ MAD_FLAG_MPEG_2_5_EXT. = 0x4000 /* MPEG 2.5 (unofficial) extension */
101 };
102
103 enumcxx . . $ $anonymous_type_a6579a3bd322e1b7_1# {
104 MAD_PRIVATE_HEADERcxx . . $ MAD_PRIVATE_HEADER. = 0x0100, /* header private bit */
105 MAD_PRIVATE_IIIcxx . . $ MAD_PRIVATE_III. = 0x001f /* Layer III private bits (up to 5) */
106 };
107
108 void mad_header_initcxx . . $ mad_header_init(703edc5141415508).(struct mad_headercxx . . $ mad_header# *);
109
110 # define mad_header_finishcxx . . $ `external/mp3/mad_frame.h:110:10`!(header) /* nothing */
111
112 int mad_header_decodecxx . . $ mad_header_decode(984ed5af1eaba0f8).(struct mad_headercxx . . $ mad_header# *, struct mad_streamcxx . . $ mad_stream# *);
113
114 void mad_frame_initcxx . . $ mad_frame_init(8ea2fad82e74cd).(struct mad_framecxx . . $ mad_frame# *);
115 void mad_frame_finishcxx . . $ mad_frame_finish(8ea2fad82e74cd).(struct mad_framecxx . . $ mad_frame# *);
116
117 int mad_frame_decodecxx . . $ mad_frame_decode(5e45f2249fe489cf).(struct mad_framecxx . . $ mad_frame# *, struct mad_streamcxx . . $ mad_stream# *);
118
119 void mad_frame_mutecxx . . $ mad_frame_mute(8ea2fad82e74cd).(struct mad_framecxx . . $ mad_frame# *);
120
121 # endif