FFmpeg
ac3defs.h
Go to the documentation of this file.
1 /*
2  * Common AC-3 definitions
3  * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef AVCODEC_AC3DEFS_H
23 #define AVCODEC_AC3DEFS_H
24 
25 #define EAC3_MAX_CHANNELS 16 /**< maximum number of channels in EAC3 */
26 #define AC3_MAX_CHANNELS 7 /**< maximum number of channels, including coupling channel */
27 #define CPL_CH 0 /**< coupling channel index */
28 
29 #define AC3_MAX_COEFS 256
30 #define AC3_BLOCK_SIZE 256
31 #define AC3_MAX_BLOCKS 6
32 #define AC3_FRAME_SIZE (AC3_MAX_BLOCKS * 256)
33 #define AC3_WINDOW_SIZE (AC3_BLOCK_SIZE * 2)
34 #define AC3_CRITICAL_BANDS 50
35 #define AC3_MAX_CPL_BANDS 18
36 
37 /* exponent encoding strategy */
38 #define EXP_REUSE 0
39 #define EXP_NEW 1
40 
41 #define EXP_D15 1
42 #define EXP_D25 2
43 #define EXP_D45 3
44 
45 /** Delta bit allocation strategy */
46 typedef enum {
47  DBA_REUSE = 0,
52 
53 /** Channel mode (audio coding mode) */
54 typedef enum {
64 
65 /** Dolby Surround mode */
66 typedef enum AC3DolbySurroundMode {
72 
73 /** Dolby Surround EX mode */
74 typedef enum AC3DolbySurroundEXMode {
80 
81 /** Dolby Headphone mode */
82 typedef enum AC3DolbyHeadphoneMode {
88 
89 /** Preferred Stereo Downmix mode */
94  AC3_DMIXMOD_DPLII // reserved value in A/52, but used by encoders to indicate DPL2
96 
97 typedef enum {
102 } EAC3FrameType;
103 
104 #endif /* AVCODEC_AC3DEFS_H */
AC3_CHMODE_3F
@ AC3_CHMODE_3F
Definition: ac3defs.h:58
AC3DolbyHeadphoneMode
AC3DolbyHeadphoneMode
Dolby Headphone mode.
Definition: ac3defs.h:82
AC3_DSUREXMOD_NOTINDICATED
@ AC3_DSUREXMOD_NOTINDICATED
Definition: ac3defs.h:75
EAC3_FRAME_TYPE_RESERVED
@ EAC3_FRAME_TYPE_RESERVED
Definition: ac3defs.h:101
AC3DeltaStrategy
AC3DeltaStrategy
Delta bit allocation strategy.
Definition: ac3defs.h:46
AC3_DMIXMOD_DPLII
@ AC3_DMIXMOD_DPLII
Definition: ac3defs.h:94
AC3_CHMODE_3F1R
@ AC3_CHMODE_3F1R
Definition: ac3defs.h:60
EAC3_FRAME_TYPE_DEPENDENT
@ EAC3_FRAME_TYPE_DEPENDENT
Definition: ac3defs.h:99
AC3DolbySurroundEXMode
AC3DolbySurroundEXMode
Dolby Surround EX mode.
Definition: ac3defs.h:74
AC3_DSUREXMOD_ON
@ AC3_DSUREXMOD_ON
Definition: ac3defs.h:77
EAC3_FRAME_TYPE_INDEPENDENT
@ EAC3_FRAME_TYPE_INDEPENDENT
Definition: ac3defs.h:98
AC3ChannelMode
AC3ChannelMode
Channel mode (audio coding mode)
Definition: ac3defs.h:54
DBA_NONE
@ DBA_NONE
Definition: ac3defs.h:49
AC3_DSURMOD_NOTINDICATED
@ AC3_DSURMOD_NOTINDICATED
Definition: ac3defs.h:67
AC3_DHEADPHONMOD_ON
@ AC3_DHEADPHONMOD_ON
Definition: ac3defs.h:85
EAC3_FRAME_TYPE_AC3_CONVERT
@ EAC3_FRAME_TYPE_AC3_CONVERT
Definition: ac3defs.h:100
AC3_DHEADPHONMOD_RESERVED
@ AC3_DHEADPHONMOD_RESERVED
Definition: ac3defs.h:86
AC3_CHMODE_STEREO
@ AC3_CHMODE_STEREO
Definition: ac3defs.h:57
AC3_DMIXMOD_LTRT
@ AC3_DMIXMOD_LTRT
Definition: ac3defs.h:92
AC3_DMIXMOD_LORO
@ AC3_DMIXMOD_LORO
Definition: ac3defs.h:93
AC3_DSURMOD_RESERVED
@ AC3_DSURMOD_RESERVED
Definition: ac3defs.h:70
EAC3FrameType
EAC3FrameType
Definition: ac3defs.h:97
AC3PreferredStereoDownmixMode
AC3PreferredStereoDownmixMode
Preferred Stereo Downmix mode.
Definition: ac3defs.h:90
AC3_DSUREXMOD_PLIIZ
@ AC3_DSUREXMOD_PLIIZ
Definition: ac3defs.h:78
AC3_CHMODE_DUALMONO
@ AC3_CHMODE_DUALMONO
Definition: ac3defs.h:55
DBA_NEW
@ DBA_NEW
Definition: ac3defs.h:48
AC3_CHMODE_MONO
@ AC3_CHMODE_MONO
Definition: ac3defs.h:56
AC3_CHMODE_3F2R
@ AC3_CHMODE_3F2R
Definition: ac3defs.h:62
AC3_CHMODE_2F1R
@ AC3_CHMODE_2F1R
Definition: ac3defs.h:59
AC3_CHMODE_2F2R
@ AC3_CHMODE_2F2R
Definition: ac3defs.h:61
AC3_DHEADPHONMOD_NOTINDICATED
@ AC3_DHEADPHONMOD_NOTINDICATED
Definition: ac3defs.h:83
DBA_REUSE
@ DBA_REUSE
Definition: ac3defs.h:47
DBA_RESERVED
@ DBA_RESERVED
Definition: ac3defs.h:50
AC3_DSURMOD_ON
@ AC3_DSURMOD_ON
Definition: ac3defs.h:69
AC3_DMIXMOD_NOTINDICATED
@ AC3_DMIXMOD_NOTINDICATED
Definition: ac3defs.h:91
AC3_DSUREXMOD_OFF
@ AC3_DSUREXMOD_OFF
Definition: ac3defs.h:76
AC3DolbySurroundMode
AC3DolbySurroundMode
Dolby Surround mode.
Definition: ac3defs.h:66
AC3_DSURMOD_OFF
@ AC3_DSURMOD_OFF
Definition: ac3defs.h:68
AC3_DHEADPHONMOD_OFF
@ AC3_DHEADPHONMOD_OFF
Definition: ac3defs.h:84